package cn.wolfcode.edu.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor

public class Employee extends BaseDomain{
    public static final Byte NORMAL = 0;
    public static final Byte LEFT = -1;
    private String username;//用户名

    private String realName;//真实姓名

    private String password;//密码

    private String tel;//电话

    private String email;//邮箱

    private Department department;//部门
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date inputTime;//录入时间

    private Byte status = NORMAL;//状态

    private boolean admin = false;//是否是管理员
    private List<Role> roles = new ArrayList<>();
}